// 导航栏的产品  显示隐藏
function showgoods() {
    var goods = document.getElementsByClassName("goods-data")[0];
    goods.style.display = "block";
}
function hidegoods() {
    var goods = document.getElementsByClassName("goods-data")[0];
    goods.style.display = "none";
}
// 导航栏的产品  显示隐藏
function showdev() {
    var dev = document.getElementsByClassName("dev-data")[0];
    dev.style.display = "block";
}
function hidedev() {
    var dev = document.getElementsByClassName("dev-data")[0];
    dev.style.display = "none";
}
// win
function showwin() {
    var win = document.getElementById("win");
    win.src = "./image/Down.0691e8a3.svg"
}
function hidewin() {
    var win = document.getElementById("win");
    win.src = "./image/Windows.svg"
}
// app
function showapp() {
    var win = document.getElementById("app");
    win.src = "./image/Down.0691e8a3.svg"
}
function hideapp() {
    var win = document.getElementById("app");
    win.src = "./image/appStore.svg"
}
// Linux
function showLinux() {
    var win = document.getElementById("Linux");
    win.src = "./image/Down.0691e8a3.svg"
}
function hideLinux() {
    var win = document.getElementById("Linux");
    win.src = "./image/Linux.svg"
}
// ios
function showiosQr() {
    var iosQr = document.getElementsByClassName("IOS-Qr")[0];
    var iosbox = document.getElementsByClassName("IOSbox")[0];
    iosQr.style.opacity = 1;
    iosbox.style.opacity = 0;
}
function hideiosQr() {
    var iosQr = document.getElementsByClassName("IOS-Qr")[0];
    var iosbox = document.getElementsByClassName("IOSbox")[0];
    iosQr.style.opacity = 0;
    iosbox.style.opacity = 1;

}
// And
function showAndQr() {
    var AndQr = document.getElementsByClassName("Android-Qr")[0];
    var Andbox = document.getElementsByClassName("Androidbox")[0];
    AndQr.style.opacity = 1;
    Andbox.style.opacity = 0;
}
function hideAndQr() {
    var AndQr = document.getElementsByClassName("Android-Qr")[0];
    var Andbox = document.getElementsByClassName("Androidbox")[0];
    AndQr.style.opacity = 0;
    Andbox.style.opacity = 1;

}
// 更多下载
function showmoreDown() {
    var moreDown = document.getElementsByClassName("more-down")[0];
    moreDown.style.display = "block";
}
function hidemoreDown() {
    var moreDown = document.getElementsByClassName("more-down")[0];
    moreDown.style.display = "none";
}
// 优秀产品
var goodsnum = 0;
function goodsback() {
    goodsnum--;
    var goodslist = document.getElementsByClassName("listbox")[0];
    var goodsleftbtn = document.getElementsByClassName("goodsleftbtn")[0];
    var goodsrightbtn = document.getElementsByClassName("goodsrightbtn")[0];
    if (goodsnum < 0) {
        goodsnum = 0;
        goodsleftbtn.style.cursor = "not-allowed";
    } else {
        goodsrightbtn.style.cursor = "pointer";
        var oldleft = parseInt(goodslist.style.left);
        var newleft = oldleft + 300;
        goodslist.style.left = newleft + "px"
        if (goodsnum == 0) {
            goodsleftbtn.style.cursor = "not-allowed"
        }
    }
}
function goodsnext() {
    goodsnum++;
    var goodslist = document.getElementsByClassName("listbox")[0];
    var goodsleftbtn = document.getElementsByClassName("goodsleftbtn")[0];
    var goodsrightbtn = document.getElementsByClassName("goodsrightbtn")[0];
    if (goodsnum > 2) {
        goodsrightbtn.style.cursor = "not-allowed"
        goodsnum = 2;
    } else {
        goodsleftbtn.style.cursor = "pointer"
        var oldleft = parseInt(goodslist.style.left);
        var newleft = oldleft - 300;
        goodslist.style.left = newleft + "px"
        if (goodsnum == 2) {
            goodsrightbtn.style.cursor = "not-allowed"
        }
    }
}